import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/css/main.css'
import './assets/css/animate.min.css'
import './plugins/vant.js'
import './assets/font/iconfont.css'
import './api/index.js'

Vue.config.productionTip = false

// 日期函数全局过滤器
Vue.filter('dataformate',function(value){
  const d = new Date();
  const y = d.getFullYear();
  const m = d.getMonth() + 1;
  // 补充两位数加0 或者 tostring.padStart(2,0)
  const dd = d.getDate() <10 ? '0' + d.getDate() : '' + d.getDate();
  const h = d.getHours();
  const min = d.getMinutes();
  const sec = d.getSeconds();
  // return  `${y}-${m}-${dd} ${h}:${min}:${sec}`
  return  y+ '-' + m + '-' + dd + ' ' + h + ':' + min + ':' + sec;
})



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
